# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=jwt-key-recovery
_pkgname=JWT-Key-Recovery
pkgver=11.094df95
pkgrel=5
pkgdesc='Recovers the public key used to sign JWT tokens.'
groups=('blackarch' 'blackarch-crypto')
arch=('any')
url='https://github.com/FlorianPicca/JWT-Key-Recovery'
license=('custom:unknown')
depends=('python' 'python-gmpy2' 'python-pycryptodome' 'python-fastecdsa')
makedepends=('git')
source=("git+https://github.com/FlorianPicca/$_pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $_pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $_pkgname

  install -Dm 755 recover.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}

